//
//  RadioListTableViewCell.m
//  CatMusic
//
//  Created by dllo on 15/4/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "RadioListTableViewCell.h"

#define WIDTH self.contentView.frame.size.width

@implementation RadioListTableViewCell

//- (instancetype)initWithFrame:(CGRect)frame
//{
//    self = [super initWithFrame:frame];
//    if (self) {
//        self.imageView = [[UIImageView alloc] init];
//        self.tracksInfo = [[UILabel alloc] init];
//    }
//    return self;
//}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picView = [[UIImageView alloc] init];
        [self.contentView addSubview: self.picView];
        self.tracksInfo = [[UILabel alloc] init];
        self.tracksInfo.textColor = [UIColor whiteColor];
        self.tracksInfo.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:self.tracksInfo];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.picView.frame = CGRectMake(0, 0, WIDTH, 300);
//    self.picView.center = CGPointMake(185, 150);
    self.tracksInfo.frame = CGRectMake(WIDTH / 375 * 10, 270, WIDTH / 375 * 355, 30);
   
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
